<?php
use yii\helpers\Html;
use yii\helpers\HtmlPurifier;
?>
<h1>Hello About</h1>
<?php echo Html::encode($str);?>将<>实体化
<?php echo HtmlPurifier::process($str);?>彻底去掉script代码

<?php $this->beginBlock("block1");?>
<h1>block1</h1>
<?php $this->endBlock()?>
